#!/bin/bash
# 更换阿里源
if [[ ! -z $1 ]] && [[ -d $1 ]] && [[ -z ${unline_path} ]]
then
PREHOME=$1
elif [[ ! -z ${unline_path} ]]
then
PREHOME=${unline_path}
else
PREHOME=${HOME}"/unline"
fi
sudo cp /etc/apt/sources.list /etc/apt/sources.list.back
sudo cat ${PREHOME}/sourcelist/sources.list  >>  /etc/apt/sources.list
sudo apt-get update